import axios, {ResponseData} from 'yuxin-base/src/utils/axios'

/**
 * 能源列表
 * @param data
 */
export const financeEneryRecord = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/finance/finance_enery_record/page',
		data,
		method: 'POST'
	})
}

/**
 * 导出能源费模版
 * @param data
 */
export const energyExport = (data: object): Promise<ResponseData> => {
	return axios.request({
		url: '/basesearch/house/energy_fzn/export',
		data,
		method: 'POST',
		responseType: 'blob'
	})
}
/**
 * 导入能源
 * @param data
 */
export const energyImport = 'finance/finance_bill/energy_fzn/import'
/**
 * 重置
 * @param data
 */
export const energyReset = (data: any): Promise<ResponseData> => {
	return axios.request({
		url: '/finance/finance_enery/reset',
		data,
		method: 'POST'
	})
}
/**
 * 生成账单
 * @param data
 */
export const generateFinance = (data: any): Promise<ResponseData> => {
	return axios.request({
		url: '/finance/finance_enery/generate_finance',
		data,
		method: 'POST'
	})
}
